package com.chenjian.designpattern.builder;

public class ComputerBuilder {

    private Computer computer = new Computer();


    /**
     * 组装配件
     *
     * @param mainUnit
     */
    public void installMainUnit(String mainUnit) {

        computer.setMainUnit(mainUnit);

    }

    /**
     * 组装配件
     *
     * @param keyboard
     */
    public void installKeyboard(String keyboard) {

        computer.setKeyboard(keyboard);

    }

    /**
     * 组装配件
     *
     * @param Mouse
     */
    public void installMouse(String Mouse) {

        computer.setMouse(Mouse);

    }

    /**
     * 提供返回被创建者对象
     *
     * @return
     */
    public Computer getComputer() {

        return computer;
    }
}